package com.example.projectcode.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.projectcode.mapper.TestRecordMapper;
import com.example.projectcode.model.TestRecord;
import com.example.projectcode.service.TestRecordService;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class TestRecordServiceImpl extends ServiceImpl<TestRecordMapper, TestRecord> implements TestRecordService {
    @Override
    public int insertTestRecord(Integer testId, Integer stuId) {
        TestRecord testRecord = new TestRecord();
        testRecord.setTestId(testId);
        testRecord.setStuId(stuId);
        testRecord.setTestTime(new Date().toString());
        return baseMapper.insert(testRecord);
    }
}
